import {
  getAssetList as getAssetListApi,
  upload as uploadApi,
  uploadImg,
} from "@/api";

export const getAssetList = (data) => {
  return getAssetListApi({
    ...data,
    pageNumber: data.page,
    page: undefined,
  }).then(([err, res]) => {
    const _res = {
      ...res?.data.pages || {},
      options: res?.data.options || [],
    };
    return [err, { data: _res }];
  });
};


export const upload = (data: any,) => {
  return uploadApi(data);
};
